﻿//-------------------------------------------------------------------
//版权所有：版权所有(C) 2010，Microsoft(China) Co.,LTD
//系统名称： 
//文件名称：IEmailUtility
//模块名称：邮件服务接口
//模块编号：
//作　　者：lhc
//完成日期：2010-1-25
//功能说明：
//-----------------------------------------------------------------
//修改记录： 
//修改人：   
//修改时间： 
//修改内容： 
//-----------------------------------------------------------------

using System.Collections.Generic;
using System.Net.Mail;
using System.Text;

namespace SpeadFrm.Email
{
    /// <summary>
    /// 邮件服务接口
    /// </summary>
    public interface IEmailUtility
    {


        /// <summary>
        /// 发送邮件 如果不配置
        /// FromEmailAddress(发送邮件账户)  不配置读取Web.config的<add key="SMTPUser" />
        /// FromEmailPassword(发送邮件密码) 不配置读取Web.config的<add key="SMTPPwd" />
        /// EmailHostName(邮件服务器)       不配置读取Web.config的<add key="SMTPServer" />
        /// </summary>
        /// <param name="mailInfo">邮件配置实体</param>
        void Send(MailInfo mailInfo);

        /// <summary>
        /// 邮件发送
        /// </summary>
        /// <param name="toEmailAddress">发送目标邮箱列表</param>
        /// <param name="toCcEmailAddress">抄送邮箱列表</param>
        /// <param name="attachmentList">电子邮件附件列表</param>
        /// <param name="fromEmailAddress">发送账户</param>
        /// <param name="fromEmailPassword">发送密码</param>
        /// <param name="emailPersonName">发件人名</param>
        /// <param name="emailSubject">邮件标题</param>
        /// <param name="emailBody">邮件内容</param>
        /// <param name="isBodyHtml">是否HTML内容 默认为是</param>
        /// <param name="emailPriority">邮件优先级</param>
        /// <param name="port">邮箱端口号</param>
        /// <param name="emailHostName">邮箱服务器地址</param>
        /// <param name="isEnableSsl">邮件是否加密:true(加密),false(不加密)  默认为true</param>
        /// <param name="encodingType">编码格式</param>
        void Send(IList<string> toEmailAddress, IList<string> toCcEmailAddress, IList<Attachment> attachmentList, string fromEmailAddress, string fromEmailPassword, string emailPersonName, string emailSubject, string emailBody, bool isBodyHtml, EmailPriorityEnum emailPriority, int port, string emailHostName, bool isEnableSsl, Encoding encodingType);
         
    }
}
